package antidestiny.utilib.ui.fragment.explorer;

import java.io.File;

/**
 * Created by Hero on 2016/12/31.
 */

public class FileItem implements Comparable<FileItem>{

    public final String fileName;
    /**
     * 文件的路径
     */
    public final String path;
    public boolean checked=false;

    public FileItem(File file){
        this(file.getName(),file.getAbsolutePath());
    }
    public FileItem(String fileName, String filePath) {
        this.fileName = fileName;
        this.path = filePath;
    }

    @Override
    public String toString() {
        return fileName;
    }

    @Override
    public int compareTo(FileItem another) {
        return toString().compareTo(another.toString());
    }
}
